<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/WEB-INF/facelets/template.xhtml">

        <ui:param name="title" value="JadeTalk Browse Images" />

        <ui:define name="content">
            <div class="imageList">
                <h:dataTable id="imageList" value="#{imageViewBackingBean.allImages}" var="image">
                    <f:facet name="header">
                        <h:outputText value="Entry list" />
                    </f:facet>
                    <h:column>
                        <h:outputLink value="./image-#{image.id}">
                            <h:graphicImage styleClass="imageThumb" url="image/#{image.imageLocation}" />
                        </h:outputLink>
                    </h:column>
                    <h:column>
                        Rating: #{image.rating}<br />
                        Uploaded by: #{image.user.username}<br/>
                        Added: <h:outputText value="#{image.added}">
                            <f:converter converterId="com.ocpsoft.PrettyTimeConverter"/>
                        </h:outputText><br/>
                        Number of comments: #{image.commentThread.comments.size()}<br/>
                    </h:column>
                </h:dataTable>
            </div>
        </ui:define>

    </ui:composition>
</html>

